<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
<script>
//     let num;
//     num = 10;
//     console.log(num);
//     let str;
//     console.log(str);   //未定义
//     let n1,n2,n3;
//     let a = 20,c = 'sss';   //创建变量并赋值
//     const userName = 'admin';   //常量
//     console.log(userName);
//    // userName = 'xiaoming';   //不能修改常量的值，执行后会报错
//     console.log(userName);

    let flag = true;
    console.log(flag);  //true
    console.log(typeof(flag));  //数据类型
    let num1 = 123, num2 = 0x23;
    console.log(num1);
    console.log(num2);
    console.log(typeof(num1));
    console.log(typeof(num2));
    console.log('------------')
    let str1 = '';str2 = 'hello';str3 = 'javascript';
    console.log(str1);
    console.log(str2);
    console.log(str3);
    console.log(typeof(str1));
    console.log(typeof(str2));
    console.log(typeof(str3));
    //子曰：'学而时习之，不亦说乎'
    //在双引号中使用双引号，或在单引号中使用双引号，需要用\进行转义
    let str = "子曰(\"老子\")：'学而时习之，不亦说乎'";
    console.log(str);
    console.log('-------');
    let n1 = null,n2;
    console.log(n1);
    console.log(n2);

</script>
</html>